package com.cw.jeeyt.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cw.jeeyt.api.DemoApi;

/**
 * @author chenw
 * @date 2021/10/26
 */
@RestController
@RequestMapping("/demo")
@DubboService(group = "${dubbo.application.name}", protocol = "dubbo", version = "${dubbo.service.version}")
public class DemoApiImpl implements DemoApi {
    // @DubboReference(providedBy = {"hrkj-jeeyc-center"}, group = "hrkj-jeeyc-center", protocol = "dubbo",
    //     version = "${dubbo.service.version}", check = false, timeout = 3000)
    // private HelloApi helloApi;

    @Override
    @RequestMapping("hello")
    public String hello() {
        // String word = helloApi.hello("chenw");
        // System.out.println(word);
        return "success";
    }
}
